def setup
  size 200, 200
  noStroke
  background 0
  
  c = loadImage "cait.jpg"
  xoff, yoff = 0, 0
  p = 2
  pix = p * 3
  c.pixels.each do |here|
    fill red(here), 0, 0
    rect xoff, yoff, p, pix
    
    fill 0, green(here), 0
    rect xoff+p, yoff, p, pix
    
    fill 0, 0, blue(here)
    rect xoff+p*2, yoff, p, pix
    
    xoff += pix
    if xoff >= width - pix
      xoff = 0
      yoff += pix
    end
  end
end